﻿using System;
using System.Web.UI;
using System.Web.Configuration;
using System.Data;
using System.Web.UI.WebControls;

public partial class manager_taskdept_Default : System.Web.UI.Page
{
    public string num_1 = "0";
    public string num_2 = "0";
    public string num_3 = "0";
    public string num_4 = "0";
    public string num_5 = "0";

    DBHelper db = new DBHelper();
    protected void Page_Load(object sender, EventArgs e)
    {
        ((Label)Master.FindControl("MESS")).Text = (Request.QueryString["mes"]);
        if (!IsPostBack)
        {
            bindData();
        }
    }
    private void bindData()
    {

        string sql = "select * from A_Eval_Sys where [state]=0";
        DataTable dt = db.getList(sql);
        int year = Convert.ToInt32(dt.Rows[0]["year"].ToString());
        int kp_year = year;
        int month = Convert.ToInt32(dt.Rows[0]["month"].ToString());
        int kp_month = month;
        string dept = Session[AppConfig.SESSION_USER_DEPT].ToString();

        string zx_psid = Session[AppConfig.SESSION_USER_PSID].ToString();


        dt = db.getList("select * from v_A_Task where  dept_bkh='" + dept + "'   and year='" + kp_year + "' and month='8' order by state,task_state,LX_TYPE ");
        rpt_Listask1.DataSource = dt;
        rpt_Listask1.DataBind();
        num_1 = dt.Rows.Count.ToString();      
    }
}